package com.mangguo.tingjian.user.service.impl;

import com.mangguo.tingjian.user.dto.CountResult;
import com.mangguo.tingjian.user.entity.DwUserLiveMini;
import com.mangguo.tingjian.user.mapper.DwUserLiveMiniMapper;
import com.mangguo.tingjian.user.mapper.DwUserLiveMiniMapper;
import com.mangguo.tingjian.user.service.IDwUserLiveMiniService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 活跃用户-小程序 服务实现类
 * </p>
 *
 * @author auto
 * @since 2019-11-25
 */
@Service
@AllArgsConstructor
public class DwUserLiveMiniServiceImpl extends ServiceImpl<DwUserLiveMiniMapper, DwUserLiveMini> implements IDwUserLiveMiniService {

    private final DwUserLiveMiniMapper dwUserLiveMiniMapper;

    @Override
    public Long countUniqueImeiBetweenDate(Integer start, Integer end) {
        return dwUserLiveMiniMapper.countUniqueImeiBetweenDate(start, end);
    }

    @Override
    public List<CountResult> countUniqueImeiByMonth() {
        return dwUserLiveMiniMapper.countUniqueImeiByMonth();
    }

    @Override
    public List<CountResult> countUniqueImeiByWeek() {
        return dwUserLiveMiniMapper.countUniqueImeiByWeek();
    }

    @Override
    public List<CountResult> countUniqueImeiByDate() {
        return dwUserLiveMiniMapper.countUniqueImeiByDate();
    }

    @Override
    public List<CountResult> countUniqueImeiByMonth(Integer start, Integer end) {
        return dwUserLiveMiniMapper.countUniqueImeiByMonthBetweenDate(start, end);
    }

    @Override
    public List<CountResult> countUniqueImeiByWeek(Integer start, Integer end) {
        return dwUserLiveMiniMapper.countUniqueImeiByWeekBetweenDate(start, end);
    }

    @Override
    public List<CountResult> countUniqueImeiByDate(Integer start, Integer end) {
        return dwUserLiveMiniMapper.countUniqueImeiByDateBetweenDate(start, end);
    }
}

